<!--
 * 应用管理
 * @author luguoxiang
 * @date 2023-03-28
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
-->
<template>
  <detail-container ref="containerRef" v-bind="containerConfig">
    <lg-description v-loading="loading" :schema="schema" v-bind="descriptionConfig">
      <template #homeUrl="{ value }">
        <t-link theme="primary" :href="value">{{ value }}</t-link>
      </template>
    </lg-description>
  </detail-container>
</template>

<script setup lang="ts">
import { ref } from 'vue';
import { DetailContainer, useDetailContainer } from '@/components';
import { LgDescription } from '@/soar';
import schema from './schema';
import api from './api';

const containerRef = ref();

const { containerConfig, descriptionConfig, loading, open } = useDetailContainer({
  containerRef,
  header: '应用管理详情',
  getData: (params: any) => api.detail(params.id),
  containerProps: {
    width: '50%',
  },
});

defineExpose({ open });
</script>
